<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<c:set var="base" value="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}" />
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<script type="text/javascript">
	function list(){
		location.href="${base}/user/list";
	}
	
	function esLoad(){
		$.ajax({
    		type:"POST",
    		dataType:"text",
    		url:'${base}/user/esTest',
            success:function(data){
            	console.log(data)
    	    }
    	});
	}
	
	function initData(){
		location.href="${base}/pem/gencode/init";
	}
	
	function toFastDFS(){
		location.href="${base}/fastdfs/init";
	}
	
	function ceshi(){
		$.ajax({
	        type: 'POST',
	        url: 'http://localhost:7002/pemapp/api/shareproject/get',
	        data: {'projectzj':'0031B03C44AE4446AA54DE5B145E18A7'},
			contentType : 'application/json; charset=UTF8',
	        dataType: 'json',
	        headers: {
	          'access_token': 'EBC830285EE4414CA4A3F0CDB1C1B7A0'
	        },
	        success: function(msg){
	          console.log( "Data Saved: " + msg );
	        }
	      })
	}
	
</script>
</head>
<body>
<!-- 	<h1 onclick="list()">aaa</h1> -->
		<h4 onclick="list()">NotejsDemo</h4>
		<h4 onclick="esLoad()">Elasticsearch</h4>
		<h4 onclick="initData()">生成数据</h4>
		<h4 onclick="toFastDFS()">FastDFS</h4>
		<h4 onclick="ceshi()">测试</h4>
</body>
</html>